﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class 实验二_2_4_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        HttpCookie cook = new HttpCookie("name");
        cook.Value = TextBox1.Text;
        cook.Expires= DateTime.Now.AddMinutes(2);
        Response.Cookies.Add(cook);
        Response.Redirect("User.aspx");
    }
}